{layout name="public:layout" /}
<h4 class="text-center text-danger">站点管理</h4>
<form class="form-horizontal" action="{:url('site/save')}" method="post">
    <div class="form-group">
        <label  class="col-sm-2 control-label">网站名称：</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" name="name" value="{$siteInfo.name}" >
        </div>
    </div>

    <div class="form-group">
        <label  class="col-sm-2 control-label">关键字：</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" name="keywords" value="{$siteInfo.keywords}" >
        </div>
    </div>

    <div class="form-group">
        <label  class="col-sm-2 control-label">网站描述：</label>
        <div class="col-sm-10">
            <textarea class="form-control" name="desc" id="desc" style="min-height: 250px" >{$siteInfo.desc}
            </textarea>
        </div>
    </div>

<!--    网站是否关闭-->
    <div class="form-group">
        <label class="col-sm-2 control-label">网站是否开启</label>
            <label class="radio-inline">
                <input type="radio" name="is_open" value="1"
                       {eq name="$siteInfo.is_open" value="1"}
                       checked
                       {/eq}
                > 开启
            </label>
            <label class="radio-inline">
                <input type="radio" name="is_open" value="0"
                       {eq name="$siteInfo.is_open" value="0"}
                       checked
                       {/eq}
                > 关闭
            </label>
    </div>


<!--    如果网站已关闭，则不显示注册状态-->
    {eq name="$siteInfo.is_open" value="1"}
<!--    注册是否关闭-->
    <div class="form-group">
        <label class="col-sm-2 control-label">注册是否开启</label>
            <label class="radio-inline">
                <input type="radio" name="is_reg" value="1"
                       {eq name="$siteInfo.is_reg" value="1"}
                       checked
                       {/eq}
                > 开启
            </label>
            <label class="radio-inline">
                <input type="radio" name="is_reg" value="0"
                       {eq name="$siteInfo.is_reg" value="0"}
                       checked
                       {/eq}
                > 关闭
            </label>
    </div>
{/eq}

    <!--    将当前用户id作为隐藏域数据 传递到服务器-->
    <input type="hidden" name="id" value="{$siteInfo.id}">



    <button type="submit" class="btn btn-primary">保存</button>
</form>
